﻿<Window x:Class="CodeJumper.OptionsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:my="clr-namespace:CodeJumper"
        Title="Code Jumper Options" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Topmost="False" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="323" Width="368">
    <Window.Resources>
        <ObjectDataProvider MethodName="GetValues"
                        ObjectType="{x:Type sys:Enum}"
                        x:Key="PluginLocationValues">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="my:PluginLocation" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        <ObjectDataProvider MethodName="GetValues"
                        ObjectType="{x:Type sys:Enum}"
                        x:Key="AlphabeticalSortValues">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="my:AlphabeticalSortOrder" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        <ObjectDataProvider MethodName="GetValues"
                        ObjectType="{x:Type sys:Enum}"
                        x:Key="SortTypeValues">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="my:SortType" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        <ObjectDataProvider MethodName="GetValues"
                        ObjectType="{x:Type sys:Enum}"
                        x:Key="YesNoTypeValues">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="my:YesNoType" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

    </Window.Resources>
    <Grid Margin="20">
        <StackPanel>
            <TabControl Height="180">
                <TabItem Header="General">

                    <Border Padding="5" BorderBrush="Black" BorderThickness="0.2" CornerRadius="5">
                        <StackPanel>
                            <Grid VerticalAlignment="Top">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <ComboBox  Margin="5" Name="locationCombo" SelectedIndex="0" ItemsSource="{Binding Source={StaticResource PluginLocationValues}}" Grid.Row="1" Grid.Column="1" />
                                <TextBlock Margin="5" Text="Location in Editor" Name="textBlock0" Grid.Row="1" Grid.Column="0" />
                                <TextBlock Margin="5" Text="*" Grid.Row="1" Grid.Column="2" Foreground="Red" ToolTip="Requires reload"/>

                                <TextBlock Margin="5" Name="textBlock1" Text="Hide variables" Grid.Row="2" Grid.Column="0" />
                                <ComboBox Margin="5" Name="hideVarsCombo"  SelectedIndex="0" ItemsSource="{Binding Source={StaticResource YesNoTypeValues}}" Grid.Row="2" Grid.Column="1" />

                                <TextBlock Margin="5" Text="Hide properties" Grid.Row="3" Grid.Column="0" />
                                <ComboBox Margin="5" Name="hidePropertiesCombo"  SelectedIndex="0" ItemsSource="{Binding Source={StaticResource YesNoTypeValues}}" Grid.Row="3" Grid.Column="1" />

                                <TextBlock Margin="5" Name="textBlock2" Text="Sort Layout" Grid.Row="4" Grid.Column="0" />
                                <ComboBox Margin="5" ItemsSource="{Binding Source={StaticResource SortTypeValues}}" Name="sortCombo" SelectedIndex="0" Grid.Row="4" Grid.Column="1" />
                            </Grid>
                        </StackPanel>
                    </Border>
                </TabItem>
                <TabItem Header="Themes">
                    <Grid>
                        <StackPanel>
                            <TextBlock TextWrapping="Wrap" Text="Interactive theming will soon be supported. In the meantime you can edit the theme file directly." VerticalAlignment="Top" HorizontalAlignment="Center" TextAlignment="Justify" />
                            <Button HorizontalAlignment="Center" VerticalAlignment="Bottom" Content="Edit Default.xaml"  Click="Button_Click_2" Margin="20" />
                            <Button HorizontalAlignment="Center" VerticalAlignment="Bottom" Content="Reload Theme Settings" Click="Button_Click_3"  />
                        </StackPanel>
                    </Grid>
                </TabItem>
            </TabControl>

        </StackPanel>
        <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button Content="Ok" Height="28" Width="59" Margin="5" Click="Button_Click" />
            <Button Content="Cancel" Height="28" Width="59"  Margin="5" Click="Button_Click_1" />
        </StackPanel>
    </Grid>
</Window>
